<template>
  <!--附件弹窗部分 -->
  <!-- <el-dialog  v-dialogDrag  
    :close-on-click-modal="false"
    :title="dialogStatus"
    :visible.sync="showappendix"
    width="45%"
    @close="notshow"
  >
    <el-form

      class="dialog-backgroundcolor"
    >
      <div class="block">
        <el-timeline :reverse="true">
          <el-timeline-item
            v-for="(activity, index) in activities"
            :key="index"
            :icon="activity.icon"
            :type="activity.type"
            :color="activity.color"
            :size="activity.size"
            :timestamp="activity.timestamp"
          >
            {{ activity.content }}
          </el-timeline-item>
        </el-timeline>
      </div>
      <div><span v-if="state">暂无数据</span></div>
      <el-row>
        <el-col
          :span="24"
          style="text-align: center; margin-top:20px;"
        >
          <el-button @click="notshow">
            关闭
          </el-button>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog> -->
  <el-drawer
    :title="dialogStatus"
    :visible.sync="showappendix"
    :direction="direction"
    :before-close="notshow"
  >

    <div class="block">
      <el-timeline :reverse="true">
        <el-timeline-item
          v-for="(activity, index) in activities"
          :key="index"
          :icon="activity.icon"
          :type="activity.type"
          :color="activity.color"
          :size="activity.size"
          :timestamp="activity.timestamp"
        >
          {{ activity.content }}
        </el-timeline-item>
      </el-timeline>
    </div>
    <div><span v-if="state">暂无数据</span></div>
    <el-row>
      <el-col
        :span="24"
        style="text-align: center; margin-top:20px;"
      >
        <el-button @click="notshow">
          关闭
        </el-button>
      </el-col>
    </el-row>
  </el-drawer>
</template>

<script>
import { getApprovalProcess } from '@/api/baseInfo'

export default {
  components: { },
  props: [],
  data() {
    return {
      agencyId: '',
      activities: [],
      showappendix: false,
      state: false,
      direction: 'rtl',
      dialogStatus: ''
    }
  },
  watch: {},
  mounted() {},
  created() {},
  methods: {
    notshow() {
      this.showappendix = false
    },
    getList(agencyId) {
      this.activities.splice(0, this.activities.length)
      this.dialogStatus = '审核日志'
      this.showappendix = true
      this.agencyId = agencyId
      getApprovalProcess(this.agencyId).then(response => {
        this.activities = response.data
        if (this.activities.length === 0) {
          this.state = true
        } else {
          this.state = false
        }
      })
    }

  }
}
</script>
<style >

.el-drawer{
   overflow: auto;
    }
:focus{

        outline:0;
    }

</style>
